package com.反射;

public class reflect {
  public static void main(String[] args) throws Exception{
//    try{
//        Class clazz = Class.forName("package com.反射.Dog");
//        Constructor constructor = clazz.getConstructor();
//        Object obj = constructor.newInstance();
//        Field field1 = clazz.getDeclaredField("age");
//        String setField1Method = "set" + field1.getName();
//        Method setField1Method = clazz.getDeclaredMethod(setField1Method,field1.getType());
//    }
  }
}
